package org.tigris.atlas.xml.schema.mda.element;

import org.tigris.atlas.mda.metadata.element.Enum;

public class SchemaEnum implements Enum {
	
	private Enum enumInstance;
	
	/**
	 * Create a new instance of <tt>Enum</tt> with the correct functionality set 
	 * to generate Schema code
	 * @param enumInstanceToDecorate The <tt>Enum</tt> to decorate
	 */
	public SchemaEnum(Enum enumInstanceToDecorate) {
		if (enumInstanceToDecorate == null) {
			throw new IllegalArgumentException("SchemaEnums must be instatiated with a non-null enum!");
		}
		enumInstance = enumInstanceToDecorate;
	}	

	public String getName() {
		return enumInstance.getName();
	}

	public String getValue() {
		return enumInstance.getValue();
	}

	public boolean hasValue() {
		return enumInstance.hasValue();
	}

}
